package com.tianyang.yukuaifu.business.main.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tianyang.yukuaifu.R;
import com.tianyang.yukuaifu.business.main.bean.MyBean;
import com.tianyang.yukuaifu.utils.VerifyUtil;

import java.util.ArrayList;

/**
 * Description：
 * Created by xyj on 2024/4/18
 */
public class MyAdapter extends BaseQuickAdapter<MyBean, BaseViewHolder> {

    public MyAdapter() {
        super(R.layout.item_my, new ArrayList<>());
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, MyBean item) {
        if (item != null) {
            helper.setText(R.id.titleTv, VerifyUtil.checkString(item.getTitle()))
                    .setImageResource(R.id.iconIv, item.getDrawableId());
        }
    }
}
